package com.itheima.exerciseTest.method01_09.method1;

public abstract class Animal {
    private int age; // 年龄
    private int numOfLegs; // 腿的个数

    public Animal() { }
    public Animal(int age, int numOfLegs) { this.age = age;this.numOfLegs = numOfLegs; }
    public int getAge() { return age; }
    public void setAge(int age) { this.age = age; }
    public int getNumOfLegs() { return numOfLegs; }
    public void setNumOfLegs(int numOfLegs) { this.numOfLegs = numOfLegs; }

    public abstract void eat();
}
